<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" errorPage="500.jsp"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title></title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/search.css">
  	<link rel="stylesheet" href="css/index.css">
  	<link rel="stylesheet" href="css/common.css">
  	<!-- 小图标 -->
  	<link rel="icon" href="css/favicon.ico" type="image/x-icon" />
  	<script src="js/jquery-1.12.4.js"></script>
</head>
<body>
	<!-- 头部 -->
	<div class="header">
    	<div class="header-inner">
	      	<h1>
	        	<a href="index.html" class="logo">太平洋影城</a>
	      	</h1>
      		<div class="nav">
	        	<ul class="navbar">
		          	<li>
		            	<a href="index" >首页</a>
		          	</li>
	          		<li>
	            		<a href="hotFilm.do">电影</a>
	          		</li>
	          		<li>
	            		<a href="#">影院</a>
	          		</li>
	          		<li>
	            		<a href="#">演出</a>
	          		</li>
		          	<li>
		            	<a href="billboard.do">榜单</a>
		          	</li>
	          		<li>
	            		<a href="#">热点</a>
	          		</li>
	          		<li>
	            		<a href="#">商城</a>
	          		</li>
	        	</ul>
      		</div>
      		<div class="user-info">
        		<div class="user-avatar J-login">
	          		<c:choose>
	       				<c:when test="${sessionScope.userLogin !=null}">
	         				<img src="${sessionScope.userLogin.uImg}">
	       				</c:when>
	       				<c:otherwise>
	         				<img src="img/top_img/default_head.png">
	       				</c:otherwise>
	     			</c:choose>
	     			<span class="caret"></span>
	     			<c:choose>
	       				<c:when test="${sessionScope.userLogin !=null}">
	         				<ul class="user-menu yes-login-menu">
					           	<li class="text">
					             	<a href="order.do?uid=${sessionScope.userLogin.uId}">我的订单</a>
					           	</li>
					           	<li class="text login-name" >
					             	<a href="userEssential.do?uId=${sessionScope.userLogin.uId}">基本信息</a>
					           	</li>
					           	<li class="text">
					             	<a href="exit.do" class="J-logout">退出登录</a>
					           	</li>
	         				</ul>
	       				</c:when>
				       	<c:otherwise>
				         	<ul class="user-menu no-login-menu">
					           	<li>
					           		<a href="login.jsp">登录</a>
					           	</li>
				         	</ul>
				       	</c:otherwise>
	     			</c:choose>
      			</div>
    		</div>
		    <form action="searchFilm.do" method="post" class="search-form">
		      	<input name="kw" class="search" type="search" maxlength="32" placeholder="找影视剧、影人、影院">
		      	<input class="submit" type="submit" value="">
		    </form>
    		<div class="app-download">
		      	<a href="#">
		        	<span class="iphone-icon"></span>
		        	<span class="apptext">APP下载</span>
		        	<span class="caret"></span>
		        	<div class="download-icon">
		          		<p class="down-title">扫码下载APP</p>
		          		<p class="down-content">选座更优惠</p>
		        	</div>
		      	</a>
    		</div>
  		</div>
	</div>
	<!-- 占位符 -->
    <div class="header-placeholder"></div>
	<div class="search-box">
  		<form action="searchFilm.do" method="post"   class="search-form" >
	    	<input class="kw" type="text" name="kw" maxlength="32" value="" placeholder="找影视剧、影人、影院" autocomplete="off">
	    	<button class="submit" type="submit"></button>
  		</form>
	</div>
	<div class="subnav">
	  <ul class="navbar">
	    <li>
	      <a data-act="subnav-click" data-val="{subnavClick:0}" data-state-val="{subnavId:0}" class="active">影视剧(${fn:length(sessionScope.searchFilms)})</a>
	    </li>
	    <li>
	      <a data-act="subnav-click"  href="#">影人（0）</a>
	    </li>
	    <li>
	      <a data-act="subnav-click"  href="#">影院（0）</a>
	    </li>
	  </ul>
	</div>


	<div class="container" id="app">
		<div class="search-result-box">
		      <dl class="movie-list">
		      <c:forEach items="${sessionScope.searchFilms}" var="searchFilm">
		      			<dd>
						    <div class="movie-item film-channel">
						      <a href="selectOneFilm.do?filmId=${searchFilm.filmId}" target="_blank" data-act="movie-click" data-val="{movieid:995}">
						        <div class="movie-poster">
						          <img class="poster-default" src="${searchFilm.filmImg}">
						          <img alt="${searchFilm.filmName}海报封面" src="${searchFilm.filmImg}">
						        </div>
						      </a>
						        
						        
						      <div class="movie-ver"><i class="imax3d"></i></div>
						      <div class="movie-item-hover">
						        <a href="selectOneFilm.do?filmId=${searchFilm.filmId}" target="_blank" >
						           <img class="movie-hover-img" src="${searchFilm.filmImg}" alt="${searchFilm.filmName}">
						          <div class="movie-hover-info">
						            <div class="movie-hover-title" title="${searchFilm.filmName}">
						              <span class="name ">${searchFilm.filmName}</span>
						                <span class="score channel-detail-orange">
						                 <c:if test="${searchFilm.reviewScore ==null}">
				                   			 <i class="fraction">暂无评分</i>
				                   		</c:if>
				                   		<c:if test="${searchFilm.reviewScore != null}">
				                   				<i class="integer">${fn:substring(searchFilm.reviewScore,0,1)}.</i><i class="fraction">${fn:substring(searchFilm.reviewScore,2,3)}</i>
				                   		</c:if> 
				                   			
						               
						                </span>
						            </div>
						            <div class="movie-hover-title" title="${searchFilm.filmName}">
						              <span class="hover-tag">类型:</span>
						             <c:forEach items="${searchFilm.filmTypes}" var = "filmType">
						             	${filmType.typeName }
						             </c:forEach>
						            </div>
						            <div class="movie-hover-title" title="${searchFilm.filmName}">
						              <span class="hover-tag">主演:</span>
						              <c:forEach items="${searchFilm.performers}" var = "performer">
						             		${performer.perName }/
						             </c:forEach>
						            </div>
						            <div class="movie-hover-title movie-hover-brief" title="${searchFilm.filmName}">
						              <span class="hover-tag">上映时间:</span>
						             ${searchFilm.filmShowTime}
						            </div>
						          </div>
						        </a>
						      </div>
						    </div>
						    
						    <div class="channel-detail movie-item-title" title="${searchFilm.filmName}">
						      <a href="selectOneFilm.do?filmId=${searchFilm.filmId}" target="_blank" data-act="movies-click" data-val="{movieId:995}">${searchFilm.filmName}</a>
						    </div>
						<div class="movie-item-subtitle"> ${searchFilm.filmForeignName}</div>
						<div class="absolute-info">
						     <div class="channel-detail channel-detail-orange">
						     	 <c:if test="${searchFilm.reviewScore ==null}">
				                   			 <i class="fraction">暂无评分</i>
				                   		</c:if>
				                   		<c:if test="${searchFilm.reviewScore != null}">
				                   				<i class="integer">${fn:substring(searchFilm.reviewScore,0,1)}.</i><i class="fraction">${fn:substring(searchFilm.reviewScore,2,3)}</i>
				                   		</c:if> 
						     </div>
		
						  <div class="movie-item-cat">  <c:forEach items="${searchFilm.filmTypes}" var = "filmType">
						             	${filmType.typeName }
						             </c:forEach></div>
						  <div class="movie-item-pub"> ${searchFilm.filmShowTime}</div>
						</div>
				  
				  </dd>
		      
		      </c:forEach>
				
			
		  </dl>
		  <c:if test="${fn:length(sessionScope.searchFilms) == 0}">
		  		<div class="empty-list">
			      <h3>很抱歉，没找到相关的影视剧</h3>
			      <dl>
			        <dt>小喵建议您：</dt>
			        <dd>1. 请检查输入的关键词是否有误</dd>
			        <dd>2. 请缩短关键词</dd>
			      </dl>
			    </div>
		  </c:if>

		  
		</div>
    </div>

	<!-- 底部 -->
	<div class="footer">
    	<div class="content">
      		<div class="moduleBox">
        		<div class="informationBox">
          			<div class="copy_van">
            			<a class="ycgg" href="">
            				<span>影城公告</span>
            			</a>
            			<ul>
              				<li>影城公告</li>
            			</ul>
          			</div>
          			<div class="copy_van">
            			<a class="ycgg" href="">
            				<span>会员中心</span>
            			</a>
			            <ul>
			              	<li>加入会员</li>
			              	<li>会员活动</li>
			              	<li>会员优惠</li>
			            </ul>
          			</div>
          			<div class="copy_van">
            			<a class="ycgg" href="">
            				<span>影片资讯</span>
            			</a>
			            <ul>
			              	<li>正在热映</li>
			              	<li>即将上映</li>
			            </ul>
          			</div>
		          	<div class="copy_van">
		            	<a class="ycgg" href="">
		            		<span>影城活动</span>
		            	</a>
		            	<ul>
		              		<li>影城活动</li>
		              		<li>电影资讯</li>
		            	</ul>
		          	</div>
		          	<div class="copy_van">
		            	<a class="ycgg" href="">
		            		<span>关于我们</span>
		            	</a>
			            <ul>
			              	<li>影城介绍</li>
			              	<li>影院介绍</li>
			              	<li>联系我们</li>
			            </ul>
		          	</div>
        		</div>
        		<div class="abc">
          			<div class="textFloat">
            			<div class="erwei1">
                        	<span class="spans ">
                               	<img class="img1" src="img/foot_img/wxerweima.png" alt="">
                            </span>
              				<span class="spans spanss">
                            	<a href="">微信在线购票</a>
                            </span>
            			</div>
            			<div class="erwei2">
                            <span class="spans">
                        		<img class="img1" src="img/foot_img/xcx.jpg" alt="">
                            </span>
              				<span class="spans spanss">
                                <a href="">小程序在线购票</a>
                            </span>
            			</div>
          			</div>
        		</div>
        		<div class="right_information">
		          	<ul class="ul1">
		            	<li class="lis1">连锁热线：</li>
		            	<li class="lis2">400-850-3366</li>
		          	</ul>
		          	<ul class="ul1">
		            	<li class="lis3">官方微信：</li>
		            	<li class="lis4">搜索“猫眼电影”</li>
		          	</ul>
        		</div>
		        <div class="top_btn">
                    <span>
                       	<a href="javascript:void(0)" id="top">TOP</a>
                    </span>
		        </div>
      		</div>
	      	<div class="foot_text">
	       		<div class="foot"> 版权所有(C)猫眼电影投资有限公司　　技术支持：3-1-501</div>
      		</div>
    	</div>
  	</div>
</body>
<script src="js/common.js"></script>
</html>